package com.reiuy.dao;

import com.reiuy.entity.Transaction;
import com.reiuy.entity.User;
import com.reiuy.vo.Transactioninfo;

import java.util.List;


public interface TransactionDao {
    int creattransaction(Transaction transaction);
    //创建交易

    Transactioninfo selecttransactioninfoById(Transaction transaction);
    //通过携带交易id的transaction对象拿到该交易id所对应的做展示的vo类Transactioninfo

    Float selectTotalById(Integer transactionid);
    //根据交易id查交易额

    Integer selectSellerId(Transaction transaction);
    //根据交易id查卖家id

    Integer selectCustomerId(Transaction transaction);
    //根据交易id查买家id

    int updatetransactionstate(Transaction transaction);
    //更新交易状态

    List<Transactioninfo> foundpaidtransac(User user);
    //查询用户的已支付订单

    List<Transactioninfo> foundunpaidtransac(User user);
}
